<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><{$title}>-售后管理</title>
<!-- CSS样式 -->
<link href="./css/table.css" rel="stylesheet" type="text/css"/>
<link href="../favicon.ico" type="image/x-icon" rel="icon" />
<link href="../favicon.ico" type="image/x-icon" rel="shortcut icon" />
<!-- JQuery-->
<script language="javascript" charset="utf-8" src="../js/jquery.min.js" type="text/javascript"></script>
<!-- 提示框-->
<link href="../js/Prompt/skin/ymPrompt.css" rel="stylesheet" id='skin' type="text/css"/>
<script language="javascript" charset="utf-8" type="text/javascript" src="../js/Prompt/ymPrompt.js"></script>
<!-- datetime-->
<script language="javascript" charset="utf-8" src="./js/DatePicker/WdatePicker.js" type="text/javascript"></script>
<!-- 列表js-->
<script language="javascript" charset="utf-8" src="./js/list.do.js" type="text/javascript"></script>
<{if $mod eq "edit"}>
<!-- 验证js -->
<script language="javascript" charset="utf-8" src="./js/proving.js" type="text/javascript"></script>
<!-- baidu api -->
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
<script language="javascript" charset="utf-8" src="./js/maps.do.js" type="text/javascript"></script>
<!-- kindeditor-->
<link rel="stylesheet" href="../tools/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="../tools/kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="../tools/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="../tools/kindeditor/plugins/code/prettify.js"></script>
<script charset="utf-8" src="../tools/kindeditor/lang/zh_CN.js"></script>
<script language="javascript" src="./js/kindeditor.info.js" type="text/javascript"></script>
<{/if}>
</head>
<body>
<{if $mod eq "edit"}>
<!-- 编辑 -->
<div  class="divmain">
		<form id="info_service_add" name="info_service_add" method="post" action="service.php?mod=edit&pid=<{$pid}>&page=<{$page}>" onsubmit="return serviceInput(this);">
			<table width="100%" border="0"  cellpadding="1" cellspacing="1">
				<tr>
					<th colspan="4" ><{$titleAct}></th>
				</tr>
				<tr>
					<td width="15%" class="td6" >售后点名称:</td>
					<td width="35%" class="td5">
					<input type="text" name="merchant_name" size="60" maxlength="60"  value="<{if $one.id ne 0}><{$one.merchant_name}><{/if}>" class="put" onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5\w]/g,'')"/>
					<span class="xinghao">*</span>
					</td>
					<td width="15%" class="td6">排序：</td>
					<td width="35%" class="td5">
					<input type="text" onkeyup="this.value=this.value.replace(/\D/g,'');" name="listorder"  value="<{if $one.id ne 0}><{$one.listorder}><{else}>999<{/if}>" class="updata_put"/>
					<span class="gray">提示:数字越大排得越前,默认999</span>
					</td>
				</tr>
				<tr>
				<td class="td6" >所在地:</td>
					<td class="td5">
					<div id="provinceDiv" style=" float:left;">
					 <select name="province" id="province"  onchange="loadCity('3','');codeAddress();">
					 <option value="0" >选择省</option>
					 <{foreach from=$province item=itemProvince}>
					 <option <{if $one.province eq $itemProvince.infoid}>selected="selected"<{/if}> value="<{$itemProvince.infoid}>" ><{$itemProvince.title}></option>
					 <{/foreach}></select>
					 </div>
					 <div id="cityDiv" style="display:block; float:left;" onchange="loadArea('3','');">
					  <select id="city" name="city">
					    <option value="0">选择市</option>
					    <{foreach from=$cityList item=itemCity}>
					    <option <{if $one.city eq $itemCity.infoid}>selected="selected"<{/if}> value="<{$itemCity.infoid}>" ><{$itemCity.title}></option>
					    <{/foreach}>
					  </select>
					</div>
					<div id="areaDiv" style="display:block; float:left;">
					  <select id="area" name="area">
					    <option value="0">选择区</option>
					    <{foreach from=$areaList item=itemArea}>
					    <option <{if $one.area eq $itemArea.infoid}>selected="selected"<{/if}> value="<{$itemArea.infoid}>" ><{$itemArea.title}></option>
					    <{/foreach}>
					  </select>
					</div>
					<span class="xinghao">*</span>
					</td>
					<td class="td6" >详细地址:</td>
					<td class="td5">
					<input type="text" name="address" id="address" size="120" maxlength="120" onchange="codeAddress();" value="<{if $one.id ne 0}><{$one.address}><{/if}>" class="put"/>
					<span class="xinghao">*</span>
					<input type="button" name="" class="Nbtn" onclick="return showMaps();" value=" 地图标点 "/>
					<input name="lng" type="hidden" id="lng" value="<{$one.lng}>" /><!-- 经度 -->
					<input name="lat" type="hidden" id="lat" value="<{$one.lat}>" /><!-- 纬度 -->
					</td>
					
				</tr>
				<tr>
					<td class="td6" >负责人:</td>
					<td class="td5">
					<input type="text" name="contacts"  value="<{if $one.id ne 0}><{$one.contacts}><{/if}>" class="seachInput" onkeyup="this.value=this.value.replace(/[^\u4E00-\u9FA5\w]/g,'')"/>
					<span class="xinghao">*</span>
					</td>
					<td class="td6" >QQ:</td>
					<td class="td5">
					<input type="text" name="qq" size="20" maxlength="20"  value="<{if $one.id ne 0}><{$one.qq}><{/if}>" class="seachInput" onkeyup="this.value=this.value.replace(/\D/g,'');"/>
					</td>
				</tr>
				<tr>
					<td class="td6" >固话:</td>
					<td class="td5">
					<input type="text" name="tel" size="30" maxlength="30" value="<{if $one.id ne 0}><{$one.tel}><{/if}>" class="seachInput"/>
					</td>
					<td class="td6" >手机:</td>
					<td class="td5">
					<input type="text" name="mobile" size="12" maxlength="12" value="<{if $one.id ne 0}><{$one.mobile}><{/if}>" class="seachInput" onkeyup="this.value=this.value.replace(/\D/g,'');"/>
					<span class="xinghao">*</span>
					</td>
				</tr>
				<tr>
					<td class="td6" >邮箱:</td>
					<td class="td5">
					<input type="text" name="e_mail"  value="<{if $one.id ne 0}><{$one.e_mail}><{/if}>" class="put" />
					</td>
					<td class="td6" >是否显示:</td>
					<td class="td5">
					<input type="radio" name="is_show" class="radios" value="0" <{if $one.is_show ne 1}>checked<{/if}> />不显示
					<input type="radio" name="is_show" class="radios" value="1" <{if $one.is_show eq 1}>checked<{/if}> />显示
					</td>
				</tr>
				<tr>
					<td class="td6">简介/备注:</td>
					<td class="td5" colspan="3">
					<textarea id="content1" name="content" style="width:820px;height:300px;visibility:hidden;"><{$one.content}></textarea>
					</td>
				</tr>
				<tr>
					<td colspan="4">
						<input type="hidden" name="act" id="act" value="change" />
						<input type="hidden" name="actId" id="id" value="<{if $one.id ne 0}><{$one.id}><{/if}>" />
						<input type="submit" name="okay" id="appent" value=" 保 存 " class="btn" />
						<input type="button" value=" 返 回 " class="btn" onclick="javascript:window.location.href='<{$Returnfpage}>';" />
					</td>
				</tr>
			</table>
		</form>
	</div>
<{else}>
<!-- 列表 -->
<div  class="divmain">
  <form id="select_form" name="select_form" method="get" action="service.php">
  <table border="0" cellspacing="1" cellpadding="3" width="100%" align="center">
  <tr>
  	<th width="5%"><input type="button" name="addone" value=" 添加 " class="btn" onClick="javascript:window.location.href='service.php?mod=edit&act=add';"/></th>
    <th colspan="11">售后服务点列表</th>
  </tr>

 <tr>
<td colspan="12" class="td5">
<h4 class="hseach">
<span>售后点名称/负责人:</span>
<input type="text" id="keyword" name="keyword" class="seachInput" value="<{$keyword}>"/>
<span>手机号码:</span>
<input type="text" id="mobile" name="mobile" class="seachInput" value="<{$mobile}>"/>
<span>添加时间:</span>
   <input name="t1" id="t1" value="<{$t1}>" type="text" class="datatime" onFocus="var t2=$dp.$('t2');WdatePicker({lang:'zh-cn',isShowWeek:true,readOnly:true,onpicked:function(){t2.focus();},maxDate:'#F{$dp.$D(\'t2\')}',dateFmt:'yyyy-MM-dd'})"  />
   <span>-</span>
   <input name="t2" id="t2" value="<{$t2}>" type="text" class="datatime" onFocus="WdatePicker({lang:'zh-cn',isShowWeek:true,readOnly:true,minDate:'#F{$dp.$D(\'t1\')}',dateFmt:'yyyy-MM-dd'})" />
</h4>
  </td>
  </tr>
  <tr>
  <td colspan="12" class="td5">
  <h4 class="hseach">
<span style="float:left;">所在地:</span>
<div id="provinceDiv" style=" float:left;">
 <select name="province" id="province"  onchange="loadCity('2','');">
 <option value="0" >选择省</option>
 <{foreach from=$province item=itemProvince}>
 <option <{if $province_get eq $itemProvince.infoid}>selected="selected"<{/if}> value="<{$itemProvince.infoid}>" ><{$itemProvince.title}></option>
 <{/foreach}></select>
 </div>
 <div id="cityDiv" style="display:block; float:left;">
  <select id="city" name="city" onchange="return formSubmit();">
    <option value="0">选择市</option>
    <{foreach from=$cityList item=itemCity}>
    <option <{if $city_get eq $itemCity.infoid}>selected="selected"<{/if}> value="<{$itemCity.infoid}>" ><{$itemCity.title}></option>
    <{/foreach}>
  </select>
</div>
<span>显示状态:</span>
<select name="is_show" onchange="return formSubmit();">
 <option <{if $is_show eq 0}>selected="selected"<{/if}> value="0" >全部</option>
 <option <{if $is_show eq 1}>selected="selected"<{/if}> value="1" >&nbsp;未显示</option>
 <option <{if $is_show eq 2}>selected="selected"<{/if}> value="2" >&nbsp;已显示</option>
 </select>
<input type="hidden" id="page" name="page" value="<{$page}>" />
<input type="button" name="" class="Nbtn" onclick="return formSubmit();" value=" 搜索 "/>
</h4>
  </td>
  </tr>
    </table>
  </form>
</div>
<div class="divmain">
 <form id="info_service" name="info_service" method="post" action="<{$fpage}>&page=<{$page}>" >
<table width="100%" border="0"  cellpadding="1" cellspacing="1">
  <tr>
    <td width="5%" class="td2">序号</td>
    <td width="15%" class="td2">售后点名称</td>
    <td width="12%" class="td2">所在地</td>
    <td width="8%" class="td2">负责人</td>
    <td width="10%" class="td2">手机号码</td>
    <td width="10%" class="td2">电子邮箱</td>
    <td width="10%" class="td2">添加时间</td>
    <td width="10%" class="td2">修改时间</td>
    <td width="5%" class="td2">排序</td>
    <td width="5%" class="td2">坐标</td>
    <td width="5%" class="td2">显示状态</td>
    <td width="5%" class="td2">操作</td>
  </tr>
  <{foreach from=$merchant_arr item=item}>
	<tr class="out" onMouseOver="this.className='over'" onMouseOut="this.className='out'">
	<td class="td4"><{$item.pageid}></td>
	<td class="td8"><{$item.merchant_name}></td>
	<td class="td4"><{if $item.province_value ne ""}><{$item.province_value}> <{$item.city_value}> <{$item.area_value}><{else}>未知<{/if}></td>
	<td class="td4"><{$item.contacts}></td>
    <td class="td4"><{$item.mobile}></td>
	<td class="td4"><{if $item.e_mail ne ""}><{$item.e_mail}><{else}>&nbsp;<{/if}></td>
	<td class="td4"><{if $item.addtime ne ""}><{$item.addtime}><{else}>0000-00-00 00:00:00<{/if}></td>
	<td class="td4"><{if $item.change_time ne ""}><{$item.change_time}><{else}>0000-00-00 00:00:00<{/if}></td>
	<td class="td4">
	<input type="hidden" name="all[]" value="<{$item.id}>"/>
	<input type="text" name="rep[]" onkeyup="this.value=this.value.replace(/\D/g,'')" class="updata_put" value="<{$item.listorder}>"/>
	</td>
	<td class="td4">
<{if $item.set_latlng eq 1}>
<img src="./images/hint/plus.png" title="有坐标" />
<{else}>
<img src="./images/hint/minus.png" title="无坐标" />
<{/if}></td>
	<td class="td4">
<{if $item.is_show eq 1}>
<img src="images/btn/ishow_ok.png" title="点击不显示" onclick="javascript:window.location.href='service.php?mod=ishow&ishowId=0&id=<{$item.id}>';">
<{elseif $item.is_show eq 0}>
<img src="images/btn/ishow_no.png" title="点击显示" onclick="javascript:window.location.href='service.php?mod=ishow&ishowId=1&id=<{$item.id}>';">
<{else}>
<img src="images/btn/ishow_no.png" title="点击显示" onclick="javascript:window.location.href='service.php?mod=ishow&ishowId=1&id=<{$item.id}>';">
<{/if}>
	</td>
    <td class="td4">
    <img src="./images/btn/trun.gif" title="修改"
    onclick="javascript:window.location.href='service.php?mod=edit&act=update&pid=<{$item.id}>&page=<{$page}>';"/>
    <img src="./images/btn/del.gif" title="删除" onclick="return del_cause('<{$item.id}>','<{$item.merchant_name}>');" />
    </td>
  </tr>
  <{foreachelse}>
  <tr class="out" onmouseover="this.className='over'" onmouseout="this.className='out'">
  	<td colspan="11" class="td4">
  		<img src="./images/btn/msg.gif"/>&nbsp;<span class="xinghao">没有找到...</span>
		</td>
  	</tr>
  <{/foreach}>
  <tr>
  <tr>
  <td class="td2" colspan="8">&nbsp;</td>
  <td class="td2" ><{if $recordcount ne ""}><input type="submit" name="replace" value=" 批量更新 " class="btn" /><{else}>&nbsp;<{/if}></td>
  <td class="td2" colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="12" class="td7">
          <span class="nums"><{if $recordcount ne ""}><{$recordcount}><{else}>0<{/if}></span>条
            <{if $page ne "" && $pagecount ne "" && $page lt $pagecount}><{$page}><{else}>1<{/if}>/<{if $pagecount ne ""}><{$pagecount}><{else}>1<{/if}>页
            <a href="<{$fpage}>&page=1">首页</a>
			<{if $page gt 1}><a href="<{$fpage}>&page=<{$prepage}>">上页</a><{else}><a>上页</a><{/if}>
             <a>
            <{foreach from=$numpage item=curr_id}>
            <{if $page eq $curr_id}>
            <a class="xinghao"><{$curr_id}></a>
            <{else}><a href="<{$fpage}>&page=<{$curr_id}>"><{$curr_id}></a>
            <{/if}>
            <{/foreach}>
            </a>
            <{if $page lt $pagecount}><a href="<{$fpage}>&page=<{$nexpage}>">下页</a><{else}><a>下页</a><{/if}>
			<a href="<{$fpage}>&page=<{if $pagecount ne ''}><{$pagecount}><{else}>1<{/if}>">尾页</a>

    </td>
  </tr>
</table>
</form>
</div>
<!-- delete cause css -->
<div class="cause" id="why_del" style="display:none;">
    <div class="causehd"><a onClick="del_close();" style="float:right; color:#fff; cursor:pointer;">【关闭】</a>删除原因</div>
    <form id="del_form" name="del_form" method="post" action="service.php" onsubmit="return check_cause(this);">
    <div style="padding:10px 58px;">
         <p>请填写删除<span id="del_company" class="jiacu"></span>的原因：</p>
         <div><textarea name="del_cause" style="width:300px; height:100px;"></textarea></div>
         <div style="margin:10px 0;">
         <input type="hidden" name="mod" value="delone" />
         <input type="hidden" name="delete_id" id="delete_id" value="0" />
         <input type="submit" class="btn" value="&nbsp;确定&nbsp;" />
         <span id="cause_hint" class="xinghao"></span>
         </div>
    </div>
    </form>
</div>
<{/if}>
</body>
</html>